<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>   
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="ko">
<head>
<style>
table {
	display: table;
	border-collapse: collapse;
}

body, table, input, textarea {
	font-family: cat;
	font-size: 20px;
}

a {
	text-decoration: none;
}

textarea {
	resize: none;
}

@font-face {
	font-family: cat;
	src: url('whitecat.eot'); /* IE9 호환성 보기 */
	src: url('whitecat.eot?iefix') format('eot'), /* IE6-IE8 */  
		 url('whitecat.woff') format('woff'), /* Modern Browsers */  
		 url('resources/whitecat.ttf') format('truetype');
	/* Safari, android, iOS */;
}
</style>
<title>게시글 등록</title>
<meta charset="utf-8">
<script type="text/javascript" src="/resources/js/jquery-1.10.2.js"></script>
<script>
$(document).ready(function() {
    //add more file components if Add is clicked
    $('#addFile').click(function() {
        var fileIndex = $('#fileview tr').children().length;      
        $('#fileview').append(
                '<tr><td>'+
                '   <input type="file" name="file" />'+
                '</td></tr>');
    });     
});
</script>

</head>

<body>
<jsp:include page="../main_header.jsp"></jsp:include>
<div id="container">
	<form action="ReviewInsert" method="post" enctype="multipart/form-data">
		<div align="center" class="body">
			<h2 style="height: 84px; "><br><br>
				<font color="green" size="6" >게시글 등록 화면</font>
			</h2>
			<table id="a">
				<tr height="40px">
					<td>제목</td>
					<td><input type="text" name="posts_title" maxlength="20" style="width: 300px; "></td>
					<td></td>
				</tr>
				<tr height="40px">
					<td>작성자</td>
					<td><input type="text" name="posts_Author" value="${sessionScope.loginUser.user_id}"maxlength="6" style="width: 300px; "></td>
					<td></td>
				</tr>
				<!-- <tr height="40px">
					<td>비밀번호</td>
					<td><input type="password" name="posts_password" maxlength="4"
						placeholder="4글자"></td>
					<td></td>
				</tr> -->
				<!-- <tr height="40px">
					<td>파일</td>
					<td><input type="file" name="file" maxlength="11"></td>
					<td></td>
					<table id="fileview">
						<tr>
							<td><input name="file" type="file" /></td>
						</tr>
					</table>
				</tr> -->
				<tr height="40px">
					<td>내용</td>
					<td><textarea name="posts_contents" cols="100" rows="25" style="height: 400px; "></textarea></td>
					<td></td>
				</tr>

			</table>
			
			
			 <input id="addFile" type="button" value="File Add" style="height: 35px; width: 96px; "/>    
    <table id="fileview" style="width: 174px; height: 65px">
        <tr>
            <td style="height: 48px; width: 156px; "><input name="file" type="file"style="height: 30px; width: 158px; " /></td>
        </tr>        
    </table>
    
    
			<br> <input type="submit" value="등록" style="height: 35px; width: 96px; "> <input
				type="reset" value="리셋" style="height: 35px; width: 96px; "> <br> <a href="/ReviewList">돌아가기</a>
		</div>
		<br>
		<br>
	</form>
	</div>
	<div><jsp:include page="../main_bottom.jsp"></jsp:include></div>
</body>
</html>
